<header>
  <div class="row">
    <!-- BRAND -->
    <div class="span4">
      <a href="<?php echo base_url() ?>" class="brand"></a>
    </div>

    <!-- MENU -->
    <?php if ($this->session->userdata('nome')) { ?>
      <div class="span8">
    <?php } else { ?>
      <div class="span6">
    <?php } ?>
    <?php $this->load->view('_base/navbar') ?>
    </div>

    <!-- ÁREA RESTRITA -->
    <?php if ($this->session->userdata('nome')) { ?>
      <div class="float-top">
        <div class="media">
          <a href="<?php echo base_url("usuarios/cadastro/{$this->session->userdata('id')}") ?>" class="pull-right">
            <?php if (!empty($profissional->foto)) { ?>
              <img src="<?php echo base_url("assets/img/usuarios/{$this->session->userdata('id')}.jpg") ?>" class="media-object">
            <?php } else { ?>
              <img src="<?php echo base_url('assets/img/usuarios/no-photo-small.jpg') ?>" class="media-object" />
            <?php } ?>
          </a>
          <div class="media-body">
            Bem-vindo, <a href="<?php echo base_url("usuarios/cadastro/{$this->session->userdata('id')}") ?>"><?php echo $this->session->userdata('nome') ?></a><br />
            <a href="<?php echo base_url("processos") ?>">Processos</a> - <a href="#" class="logout">Sair</a>
          </div>
        </div>
      </div>

    <?php } else { ?>
      <form class="form-signin form-inline pull-right span2" method="post">
        <legend><i class="icon-user"></i> Área Restrita</legend>
        <hr class="soften" />

        <!-- Login -->
        <div class="controls-row">
          <label for="login-header">login</label>
          <input id="login-header" name="login" class="input-small maskCpf" placeholder="Insira seu CPF" type="text" />
        </div>

        <!-- Password -->
        <div class="controls-row">
          <label for="password-header">senha</label>
          <input id="password-header" name="password" class="input-small" placeholder="Senha" type="password" />
        </div>

        <!-- Form actions -->
        <div class="controls-row">
          <a href="#" class="password-recovery">Esqueceu sua senha?</a>
          <button id="entrar-header" class="btn btn-mini btn-inverse pull-right" type="submit">OK</button>
        </div>
      </form>
    <?php } ?>
  </div>
</header>